<ng-container *ngIf="!outlet.isActivated">
    <div #tsTabsOne='tsTabs' tsTabs class="card">
        <div class="bg-white pr-3 pl-3" style="margin-bottom:20px ">
            <ts-tabs [tabs]="['仓库','库区','库位']" [target]="tsTabsOne" activeTab="仓库" [color]="global.params.color"></ts-tabs>
        </div>
        <div tsTab tab='仓库'>
            <ts-datepicker #datepickerOne="tsDatepicker" [(ngModel)]="search.params.start" [color]="global.params.color"></ts-datepicker>
            <ts-datepicker #datepickerTwo="tsDatepicker" [(ngModel)]="search.params.end" [color]="global.params.color"></ts-datepicker>
            <div class="toolbar">
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text bg-white">仓库名称</span>
                    </div>
                    <input [(ngModel)]="search.params.warehouseName" type="text" class="form-control" placeholder="请输入仓库名称关键词">
                    <div class="input-group-prepend">
                        <span class="input-group-text bg-white">商品类别(暂无)</span>
                    </div>
                    <input [(ngModel)]="search.params.warehouseName" type="text" class="form-control" placeholder="请输入商品类别关键词">
                </div>
                <br>
                <div class="input-group">
                    <div class="input-group-prepend">
                        <span class="input-group-text bg-white">日期</span>
                    </div>
                    <input tsToggle [bind]="datepickerOne" [target]="datepickerOne" [value]="search.params.start" type="text" class="form-control bg-white pointer"
                        placeholder="开始时间" readonly>
                    <div class="input-group-prepend input-group-append">
                        <span class="input-group-text bg-white">到</span>
                    </div>
                    <input tsToggle [bind]="datepickerTwo" [target]="datepickerTwo" [value]="search.params.end" type="text" class="form-control bg-white pointer"
                        placeholder="结束时间" readonly>
                </div>
                <br>
                <div class="row">
                    <div class="col-6">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text bg-white">共查询到</span>
                            </div>
                            <input type="text" value="{{pagination.total}}" class="form-control text-center bg-white" readonly placeholder="0">
                            <div class="input-group-append">
                                <span class="input-group-text bg-white">条/结果</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-6 text-right m-btn">
                        <button class="btn btn-success" routerLink="detail">
                            <span>新增</span>
                        </button>
                        <button (click)="doReset()" class="btn btn-white">
                            <i class="iconfont icon-refresh mr-2"></i>
                            <span>重置</span>
                        </button>
                        <button (click)="doSearch()" class="btn btn-white">
                            <i class="iconfont icon-search mr-2"></i>
                            <span>搜索</span>
                        </button>
                    </div>
                </div>
            </div>
            <div class="p-2">
                <div class="card rounded-0">
                    <div class="card-body">
                        <ts-table-load [display]="loading"></ts-table-load>
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <tbody>
                                    <tr class="font-weight-bold bg-light">
                                        <td *ngFor="let th of theads">{{th}}</td>
                                    </tr>
                                    <tr *ngFor="let td of list">
                                        <td>{{td.id}}</td>
                                        <td>{{td.warehouseNumber}}</td>
                                        <td>{{td.warehouseName}}</td>
                                        <td>{{td.warehouseAddress}}</td>
                                        <td>{{td.warehousePhone}}</td>
                                        <td>{{td.warehouseArea}}</td>
                                        <td>{{td.departmentName}}</td>
                                        <td>
                                            <ts-switch name="status" [color]="global.getValue('color')" [values]="{open:1,close:0}" [(ngModel)]="td.status" (ngModelChange)="change(th)">
                                            </ts-switch>
                                        </td>

                                        <td>
                                            <span (click)="confirmDelete(td.id)" tsTip="删除" class="btn-icon btn-icon-danger">
                                                <i tsIcon="delete"></i>
                                            </span>
                                            <span tsTip="详情/编辑" class="btn-icon btn-icon-info" routerLink="detail/{{td.id}}">
                                                <i tsIcon="edit"></i>
                                            </span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="text-right">
                            <ts-pagination (pageChange)="loadDatas()" [pagination]="pagination" [items]="[{text:'显示 5 条',value:5},{text:'显示 10 条',value:10},{text:'显示 20 条',value:20}]"
                                [color]="global.params.color" goTitle="跳转" prevTitle="上一页" nextTitle="下一页" startTitle="首页" endTitle="末尾"
                                outline></ts-pagination>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div tsTab tab='库区'>
            <div class="toolbar">
                <div class="row">
                    <div class="col-6">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text bg-white">共查询到</span>
                            </div>
                            <input type="text" value="{{pagination.totaltwo}}" class="form-control text-center bg-white" readonly placeholder="0">
                            <div class="input-group-append">
                                <span class="input-group-text bg-white">条/结果</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-6 text-right m-btn">
                        <button class="btn btn-success" routerLink="add">
                            <span>添加客户</span>
                        </button>
                        <button (click)="doReset()" class="btn btn-white">
                            <i class="iconfont icon-refresh mr-2"></i>
                            <span>重置</span>
                        </button>
                        <button (click)="doSearch()" class="btn btn-white">
                            <i class="iconfont icon-search mr-2"></i>
                            <span>搜索</span>
                        </button>
                    </div>
                </div>
            </div>
            <div class="p-2">
                <div class="card rounded-0">
                    <div class="card-body">
                        <ts-table-load [display]="loading"></ts-table-load>
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <tbody>
                                    <tr class="font-weight-bold bg-light">
                                        <td *ngFor="let th of theadtwo">{{th}}</td>
                                    </tr>
                                    <tr *ngFor="let td of regionlist">
                                        <td>{{td.id}}</td>

                                        <td>{{td.warehouseRegionName}}</td>
                                        <td>{{td.warehouseRegionNumber}}</td>
                                        <td>{{td.warehouseRegionArea}}</td>
                                        <td>{{td.departmentName}}</td>
                                        <td>
                                            <!-- <a class="btn-icon btn-icon-primary">
                                        <i class="fa fa-lg fa-fw fa-ellipsis-h align-middle"></i>
                                    </a> -->
                                            <span (click)="warehouseRegion(td.id)" tsTip="删除" class="btn-icon btn-icon-danger">
                                                <i tsIcon="delete"></i>
                                            </span>
                                            <span tsTip="详情/编辑" class="btn-icon btn-icon-info" routerLink="add/{{td.id}}">
                                                <i tsIcon="edit"></i>
                                            </span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="text-right">
                            <ts-pagination (pageChange)="loadDatas()" [pagination]="pagination" [items]="[{text:'显示 5 条',value:5},{text:'显示 10 条',value:10},{text:'显示 20 条',value:20}]"
                                [color]="global.params.color" goTitle="跳转" prevTitle="上一页" nextTitle="下一页" startTitle="首页" endTitle="末尾"
                                outline></ts-pagination>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div tsTab tab='库位'>
            <div class="toolbar">
                <div class="row">
                    <div class="col-6">
                        <div class="input-group">
                            <div class="input-group-prepend">
                                <span class="input-group-text bg-white">共查询到</span>
                            </div>
                            <input type="text" value="{{pagination.totalthree}}" class="form-control text-center bg-white" readonly placeholder="0">
                            <div class="input-group-append">
                                <span class="input-group-text bg-white">条/结果</span>
                            </div>
                        </div>
                    </div>
                    <div class="col-6 text-right m-btn">
                        <button class="btn btn-success" routerLink="user">
                            <span>添加用户</span>
                        </button>
                        <button (click)="doReset()" class="btn btn-white">
                            <i class="iconfont icon-refresh mr-2"></i>
                            <span>重置</span>
                        </button>
                        <button (click)="doSearch()" class="btn btn-white">
                            <i class="iconfont icon-search mr-2"></i>
                            <span>搜索</span>
                        </button>
                    </div>
                </div>
            </div>
            <div class="p-2">
                <div class="card rounded-0">
                    <div class="card-body">
                        <ts-table-load [display]="loading"></ts-table-load>
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <tbody>
                                    <tr class="font-weight-bold bg-light">
                                        <td *ngFor="let th of theadthree">{{th}}</td>
                                    </tr>
                                    <tr *ngFor="let td of Locationlist">
                                        <td>{{td.id}}</td>
                                        <td>{{td.warehouseLocationName}}</td>
                                        <td>。。。。</td>
                                        <td>{{td.warehouseLocationLayerNumber}}</td>
                                        <td>{{td.volume}}</td>
                                        <td>{{td.loadCapacity}}</td>
                                        <td>{{td.length}}</td>
                                        <td>{{td.width}}</td>
                                        <td>{{td.height}}</td>
                                        <td>{{td.warehouseLocationCost}}</td>
                                        <td>{{td.qrCode}}</td>
                                        <td>
                                            <span (click)="wareLocation(td.id)" tsTip="删除" class="btn-icon btn-icon-danger">
                                                <i tsIcon="delete"></i>
                                            </span>
                                            <span tsTip="详情/编辑" class="btn-icon btn-icon-info" routerLink="user/{{td.id}}">
                                                <i tsIcon="edit"></i>
                                            </span>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                        <div class="text-right">
                            <ts-pagination (pageChange)="loadDatas()" [pagination]="pagination" [items]="[{text:'显示 5 条',value:5},{text:'显示 10 条',value:10},{text:'显示 20 条',value:20}]"
                                [color]="global.params.color" goTitle="跳转" prevTitle="上一页" nextTitle="下一页" startTitle="首页" endTitle="末尾"
                                outline></ts-pagination>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
</ng-container>

<router-outlet #outlet="outlet"></router-outlet>